import request from '@/utils/request'

// 获取全部产品
export function getAllAppList() {
  return request({
    url: '/common/appConfig/queryAppList',
    method: 'get'
  })
}

// 获取配置明细
export function getConfig(query = {}) {
  return request({
    url: '/common/appConfig/getConfig',
    method: 'get',
    params: query
  })
}

// 新增修改配置
export function saveOrUpdateConfig(data = {}) {
  return request({
    url: 'common/appConfig/saveOrUpdateConfig',
    method: 'post',
    data: data
  })
}

export function delConfig (data = {}) {
  return request({
    url: '/common/appConfig/delConfig',
    method: 'post',
    data: data
  })
}

// 一键调整
export function batchUpdateConfig(data = {}) {
  return request({
    url: '/common/conifg/batchUpdateConfigVal',
    method: 'post',
    data: data
  })
}

// 复制配置
export function copyConfig(data = {}) {
  return request({
    url: '/common/conifg/copyConfig',
    method: 'post',
    data: data
  })
}

// 审核配置
export function auditConfig(data = {}) {
  return request({
    url: '/common/conifg/auditConfig',
    method: 'post',
    data: data
  })
}

// 快捷清除
export function clearRecord(data = {}) {
  return request({
    url: '/common/conifg/clearRecord',
    method: 'post',
    data: data
  })
}

